package com.ccnf.model.enums;

public enum AuthStatusEnum {
    NONE(0),// 未授权
    DONE(1),// 已授权
    AWAIT(2);// 等待授权

    private Integer authStatus;

    AuthStatusEnum(Integer authStatus) {
        this.authStatus = authStatus;
    }

    public Integer getAuthStatus() {
        return this.authStatus;
    }

    public static AuthStatusEnum valueOf(Integer roleType) {
        AuthStatusEnum authStatusEnum;
        switch (roleType) {
            case 0:
                authStatusEnum = NONE;
                break;
            case 1:
                authStatusEnum = DONE;
                break;
            case 2:
                authStatusEnum = AWAIT;
                break;
            default:
                throw new RuntimeException("不存在该枚举类型");
        }
        return authStatusEnum;
    }
}
